import { Button } from "antd";
import React from "react";
import { Component } from "react";
import { connect } from "umi";

class ArticleShowPage extends Component<any>{
    state = {
        record: this.props.location.state,
    }
    render() {
        return (
            <div>
                <div style={{ textAlign: 'center', fontSize: '20px', fontWeight: 'bold' }}>{this.state.record.title}</div>
                <br />
                <div style={{ textAlign: 'center', fontSize: '17px' }}>{this.state.record.author}</div>
                <br />
                <div dangerouslySetInnerHTML={{ __html: this.state.record.content }} />
                <Button onClick={() => this.props.history.goBack()}>返回</Button>
            </div>
        )
    }
}
export default connect()(ArticleShowPage)